import {
    d as r,
    D as e,
    o as s,
    c as t,
    j as a,
    t as o,
    k as n,
    i as l,
    a as i,
    m as u,
    l as c,
    u as m,
    e as p,
    h as d
} from "./index.115af62d1729265196717.js";
import {E as v} from "./el-button.c1876bd01729265196717.js";

const f = {class: "flex justify-center"}, g = {class: "text-center"}, x = ["src"],
    y = {class: "text-14px text-[var(--el-color-info)]"}, k = {class: "mt-20px"}, T = r({
        __name: "Error",
        props: {type: e.string.validate((r => ["404", "500", "403"].includes(r))).def("404")},
        emits: ["errorClick"],
        setup(r, {emit: e}) {
            const m = r, {t: p} = u(), d = {
                404: {
                    url: "/assets/svg/404.1759fece1729265196717.svg",
                    message: p("error.pageError"),
                    buttonText: p("error.returnToHome")
                },
                500: {
                    url: "/assets/svg/500.8fda557c1729265196717.svg",
                    message: p("error.networkError"),
                    buttonText: p("error.returnToHome")
                },
                403: {
                    url: "/assets/svg/403.af24f6bf1729265196717.svg",
                    message: p("error.noPermission"),
                    buttonText: p("error.returnToHome")
                }
            }, T = () => {
                e("errorClick", m.type)
            };

            return (e, u) => (s(), t("div", f, [a("div", g, [a("img", {
                width: "350",
                src: d[r.type].url,
                alt: ""
            }, null, 8, x), a("div", y, o(d[r.type].message), 1)])]))
            

            // return (e, u) => (s(), t("div", f, [a("div", g, [a("img", {
            //     width: "350",
            //     src: d[r.type].url,
            //     alt: ""
            // }, null, 8, x), a("div", y, o(d[r.type].message), 1), a("div", k, [n(i(v), {
            //     type: "primary",
            //     onClick: T
            // }, {default: l((() => [c(o(d[r.type].buttonText), 1)])), _: 1})])])]))
        }
    }), b = r({
        __name: "404", setup(r) {
            const {push: e} = m(), t = p(), a = () => {
                var r;
                e(null == (r = t.addRouters[0]) ? void 0 : r.path)
            };
            return (r, e) => (s(), d(i(T), {onErrorClick: a}))
        }
    });
export {b as default};
